Namespace.Use("Base.Utility", function(ns) {
    function IsInstanceOf(obj, cls) {
        //  Reference:
        //    http://tobyho.com/2011/01/28/checking-types-in-javascript/
        if (cls == Number || cls == Boolean || cls == String) {
            //  Special checking method for primitive types.
            return obj.constructor == cls;
        } else {
            return (obj instanceof cls);
        }
    }

    //  Export public APIs / classes.
    Namespace.Export(ns, "IsInstanceOf", IsInstanceOf);
});
